package org.pine.dictionary.bean.request;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.pine.dictionary.bean.BaseQueryRequest;
import org.pine.dictionary.common.StatusEnum;

import java.io.Serial;

/**
 * <p>
 * 字典明细查询请求体
 * </p>
 *
 * @author pine
 * @since 2024-05-17
 */
@EqualsAndHashCode(callSuper = true)
@Schema(title = "字典明细查询请求体")
@ToString(callSuper = true)
@Data
public class DictionaryDetailQueryRequest extends BaseQueryRequest {
    @Serial
    private static final long serialVersionUID = 8102717899338793529L;

    /**
     * 字典ID
     */
    @Schema(title = "dictionaryId", description = "字典ID")
    private String dictionaryId;

    /**
     * 字典明细ID
     */
    @Schema(title = "dictionaryDetailId", description = "字典明细ID")
    private String dictionaryDetailId;

    /**
     * 字典值编码
     */
    @Schema(title = "dictionaryValueCode", description = "字典值编码")
    private String dictionaryValueCode;

    /**
     * 字典值名称
     */
    @Schema(title = "dictionaryValueName", description = "字典值名称")
    private String dictionaryValueName;

    /**
     * 状态: 1=启用，0=禁用
     *
     * @see StatusEnum
     */
    @JsonSerialize(using = StatusEnum.JsonSerializer.class)
    @JsonDeserialize(using = StatusEnum.JsonDeserializer.class)
    @Schema(title = "status", description = "状态: 1=启用，0=禁用")
    private StatusEnum status;
}
